import {ARR_METHODS} from './config.js'
import observeArr from './observeArr.js';
var originArrMethods = Array.prototype;
// console.log(Array.prototype)
var arrMenthods = Object.create(originArrMethods);
// console.log(arrMenthods,56456)
// return
ARR_METHODS.map(function(m){
    arrMenthods[m] = function (){
        var args = Array.prototype.slice.call(arguments);
        console.log(arguments,56456)
        console.log(arrMenthods,56456)
            rt = originArrMethods[m].apply(this.args)  
        var newArr;
        switch (m){
            case 'push':
            case 'unshift':
                newArr = args;
                break;
            case 'splice':
            newArr = args.slice(2)
                break;
            default:
                break;
            }
            newArr && observeArr(newArr);
            return rt; 
        }
});
export {
    arrMenthods
}